<html>

<head>
    <meta charset="utf-8">
    <title>用户登入 - NewbieTown</title>
    <script src="static/js/mdui.min.js"></script>
    <link rel="stylesheet" href="static/css/mdui.min.css">
    <link rel="stylesheet" href="static/css/theme.css">
</head>

<body class="mdui-appbar-with-toolbar mdui-drawer-body-left">
    <div class="mdui-appbar mdui-appbar-fixed">
        <div class="mdui-toolbar mdui-color-blue">
            <a href="/" class="mdui-typo-headline mdui-col-xs-2">NewbieTown</a>
            <div class="mdui-toolbar-spacer"></div>
            <div class="mdui-textfield mdui-textfield-expandable mdui-float-right">
                <button class="mdui-textfield-icon mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">&#xe8b6;</i></button>
                <input class="mdui-textfield-input" type="text" placeholder="Search" />
                <button class="mdui-textfield-close mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">&#xe5cd;</i></button>
            </div>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">&#xe0c9;</i></a>
            <button class="mdui-btn mdui-btn-icon" mdui-menu="{target: '#menu'}"><i class="mdui-icon material-icons">&#xe5d4;</i></button>
            <ul class="mdui-menu mdui-menu-cascade" id="menu">
                <li class="mdui-menu-item">
                    <a href="javascript:;" class="mdui-ripple">
                        <i class="mdui-menu-item-icon mdui-icon material-icons">&#xe238;</i> Bold
                        <span class="mdui-menu-item-helper">Ctrl+B</span>
                    </a>
                </li>
                <li class="mdui-menu-item">
                    <a href="javascript:;" class="mdui-ripple">
                        <i class="mdui-menu-item-icon mdui-icon material-icons">&#xe23f;</i> Italic
                    </a>
                </li>
                <li class="mdui-menu-item">
                    <a href="javascript:;" class="mdui-ripple">
                        <i class="mdui-menu-item-icon"></i> Superscript
                        <span class="mdui-menu-item-helper">Ctrl+.</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="mdui-drawer mdui-drawer-scrollbar" id="main-drawer" style="overflow-y: hidden;">
        <div class="mdui-list" mdui-collapse="{accordion: true}" style="margin-bottom: 76px;">
            <div class="mdui-collapse-item ">
                <a href="/">
                    <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-blue">&#xe88a;</i>
                        <div class="mdui-list-item-content">首页</div>
                    </div>
                </a>
            </div>
            <div class="mdui-collapse-item ">
                <a href="/groups">
                    <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-deep-orange">&#xe886;</i>
                        <div class="mdui-list-item-content">群组</div>
                    </div>
                </a>
            </div>
            <div class="mdui-collapse-item">
                <a href="/random">
                    <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-green">&#xe417;</i>
                        <div class="mdui-list-item-content">随机浏览</div>
                    </div>
                </a>
            </div>
            <div class="mdui-divider">
            </div>
            <div class="mdui-collapse-item ">
                <a href="/signup">
                    <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-brown">&#xe851;</i>
                        <div class="mdui-list-item-content ">注册</div>
                    </div>
                </a>
            </div>
            <div class="mdui-collapse-item ">
                <a href="/signin">
                    <div class="mdui-collapse-item-header mdui-list-item mdui-ripple ">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-purple ">&#xe898;</i>
                        <div class="mdui-list-item-content ">登入</div>
                    </div>
                </a>
            </div>
        </div>
    </div>
    <div class="mdui-container mdui-shadow-16">
        <form action="/signin" method="POST">
            <div class="signinForm" style="margin-top: 1%;">
                {% if error==1 %}
                <div class="mdui-textfield mdui-textfield-floating-label mdui-text-color-red">

                    <i>骚年, 似乎账号和密码不匹配唷~</i>
                </div> {% else %}
                <div class="mdui-textfield mdui-textfield-floating-label">
                    <i>骚年, 登入之后才能召唤神龙唷~</i> {% endif %}
                </div>

                <div class="mdui-textfield mdui-textfield-floating-label">
                    <i class="mdui-icon material-icons">&#xe0be;</i>
                    <input class="mdui-textfield-input" name="email" type="email" placeholder="您注册时候用的邮箱" required/>
                    <div class="mdui-textfield-error">邮箱格式错误</div>
                </div>
                <div class="mdui-textfield mdui-textfield-floating-label">
                    <i class="mdui-icon material-icons">&#xe63f;</i>
                    <label class="mdui-textfield-label">如果忘记密码,请点击下面的按钮找回密码之后登入</label>
                    <input class="mdui-textfield-input" name="password" type="password" pattern="^.*(?=.{6,})(?=.*[a-z])(?=.*[A-Z]).*$" required/>
                    <div class="mdui-textfield-error">密码至少 6 位，且包含大小写字母</div>
                </div>
                <br>
                <!--<button class="mdui-btn mdui-btn-raised mdui-btn-dense mdui-ripple mdui-btn-block" type="submit">注册</button>-->
                <div class="mdui-row-xs-2">
                    <div class="mdui-col">
                        <a class="mdui-btn mdui-btn-block mdui-color-grey-100 mdui-ripple mdui-shadow-2" href="/forgotPassword">忘记密码</a>
                    </div>
                    <div class="mdui-col">
                        <button class="mdui-btn mdui-btn-block mdui-color-blue mdui-ripple mdui-shadow-2" type="submit">登入</button>
                    </div>
                </div>
            </div>
        </form>
    </div>

</body>

</html>